<template>
  <h2>pinia</h2>
  <p>count: {{ store.count }}</p>
  <!-- <button @click="store.add">btn</button> -->
  <button @click="fn">btn</button>

  <hr />

  <Child />
</template>

<script setup lang="ts">
import Child from "./Child.vue";

import { useCounterStore } from "./stores/counter";

const store = useCounterStore();

const fn = () => {
  // store.count++;

  store.add();

  // store.$patch({
  //   count: 200,
  //   // name: "zhangsan"
  // });
};
</script>
